package com.lemon.service.impl;

import com.lemon.entity.Member;
import com.lemon.mapper.MemberMapper;
import com.lemon.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberServiceImpl implements MemberService {
    private final MemberMapper memberMapper;
    @Autowired
    public MemberServiceImpl(MemberMapper memberMapper){this.memberMapper = memberMapper;}

    @Override
    public List<Member> queryMemberForList() {
        return this.memberMapper.queryMemberForList();
    }

    @Override
    public Member selectMemberById(Integer id) {
        return this.memberMapper.selectMemberById(id);
    }

    @Override
    public int insertMember(Member member) {
        return this.memberMapper.insertMember(member);
    }

    @Override
    public int deleteMember(Integer id) {
        return this.memberMapper.deleteMember(id);
    }

    @Override
    public int updateMember(Member member) {
        return this.memberMapper.updateMember(member);
    }
}
